package cn.qingyun.gis.modules.scenes.contant;

/**
 * 角色权限码
 * */
public enum RoleTypeEnum {
    ONE("8cd255ee-94e9-11e9-ad86-0242ac110002","省权限"),
    TWO("ffafc0e0-94ea-11e9-ad86-0242ac110002","市权限"),
    THREE("ffb17776-94ea-11e9-ad86-0242ac110002","区权限"),
    FOUR("ffb37036-94ea-11e9-ad86-0242ac110002","网格权限");

    /**
     * 角色编号
     */
    public String code;

    /**
     * 角色值
     */
    public String value;

    RoleTypeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static String getValueByCode(String codeStr) {
        for (RoleTypeEnum role : values()) {
            if (role.getCode().equals(codeStr)) {
                return role.getValue();
            }
        }
        return "";
    }
}
